<!--{block return}-->
<script language='javascript' type='text/javascript' src="source/plugin/onlineservice/template/jquery.min.js"></script>
<link href="source/plugin/onlineservice/template/im_right.css" rel="stylesheet" type="text/css" />
<div class='imbox' id='divimbox' >
<div class='imlist' id='divOnline' onmouseout='hideMsgBox(event);' style='display : none;'>
<div class='t'></div>
<div class='infobox'>{$title}</div>
<div class='con'>
<ul>
	{$data}
	<div class="o_title">{$o_title}</div>
</ul>
</div>
<div class='b'></div>
</div>
<div id='divMenu' onmouseover='OnlineOver();'><img src='source/plugin/onlineservice/template/image/kf_1.gif' class='press' alt='在线咨询'></div>
</div>
<script type="text/javascript">
	var tips; 
	var theTop = 145/*这是默认高度,越大越往下*/; 
	var old = theTop;

	function initFloatTips() {
		tips = $("#divimbox");
		moveTips();
	};

	function moveTips() {
		var tt=50;
		if (window.innerHeight) {
			pos = window.pageYOffset
		} else if (document.documentElement && document.documentElement.scrollTop) {
			pos = document.documentElement.scrollTop
		} else if (document.body) {
			pos = document.body.scrollTop;
		}
		pos=pos-tips.offset().top+theTop;
		pos=tips.offset().top+pos/10;
		if (pos < theTop) pos = theTop;
		if (pos != old) {
			tips.css("top",pos+"px");
			tt=10;
		}
			old = pos;
			setTimeout(moveTips,tt);
	}

	initFloatTips();

	function OnlineOver(){
		$("#divMenu").css('display',"none");
		$("#divOnline").css('display', "block");
		$("#divimbox").css('width', "145px");
	}

	function OnlineOut(){
		$("#divMenu").css('display',"block");
		$("#divOnline").css('display', "none");
	}

	if(typeof(HTMLElement)!="undefined") {   
		  HTMLElement.prototype.contains=function(obj)   
		  {   
			  while(obj!=null&&typeof(obj.tagName)!="undefind"){ 
	   　　　　if(obj==this) return true;   
	   　　　　obj=obj.parentNode;
	   　　}   
			  return false;   
		  };   
	}  
	function hideMsgBox(theEvent){ 
	　 if (theEvent){
			var browser=navigator.userAgent;
			if (browser.indexOf("Firefox")>0){ 
	　　 		if (document.getElementById('divOnline').contains(theEvent.relatedTarget)) {
	　　 			return; 
				} 
			} 
			if (browser.indexOf("MSIE")>0){
				if (document.getElementById('divOnline').contains(event.toElement)) { 
					return; 
				}
			}

		}
		$("#divMenu").css('display',"block");
		$("#divOnline").css('display', "none");

	}
</script>
<!--{/block}-->